package com.itbbs.result;

import lombok.Getter;

/**
 * @author ysk
 * @version 1.0.1
 * @Description 状态码对应的信息
 * @createTime 2021年06月04日 08:44:00
 */
@Getter
public enum ResultCodeEnum {

    // 常用的状态码
    SUCCESS(200,"成功"),
    FAIL(201, "失败"),

    // 服务异常
    PARAM_ERROR( 202, "参数不正确"),
    SERVICE_ERROR(203, "服务异常"),
    DATA_UPDATE_ERROR(205, "数据版本异常"),
    INTERNET_ERR(206,"网络异常"),

    // 验证码的异常
    CODE_ERROR(310, "验证码错误"),

    // 用户账号异常
    USER_ACCOUNT(410,"账号或密码错误"),
    user_seal(411,"账号已被冻结"),
    LOGIN_AUTH(413, "未登陆"),
    ACCOUNT_EXIST(414, "账号已经存在"),
    ACCOUNT_NOEXIST(415, "账号不存在"),
    ACCOUNT_ERR(416,"账号或密码错误"),


    // 邮件服务
    FAILED_TO_SEND_MAIL(510,"邮件发送失败"),
    MAIL_EXPIRED(511,"邮件过期"),

    // redis服务的异常
    DATA_ERROR(710, "数据不存在"),

    // 加密
    SIGN_ERROR(610, "错误的签名");

    private Integer code;

    private String msg;

    ResultCodeEnum(Integer code, String msg){
        this.code = code;
        this.msg = msg;
    }
}
